﻿@using PNProject.EF
@{
    ViewBag.Title = "Detail";
    Layout = "~/Views/Shared/_Layout1.cshtml";
    Feedback feed = (Feedback)ViewData["feed"];
    List<Feedback> relative = (List<Feedback>)ViewData["relative"];
    bool lang = (bool)(ViewData["lang"]);
    string langText = lang ? "" : "en-US/";
}

<div class="hoidap">
                    	<div class="boxhoidap">
                        	<ul>
                            	<li class="hoi-I"><a href="#">@feed.Title</a></li>
                                <li class="hoi-x"><p style="font-family:Tahoma; font-weight:bold; color:#333">@feed.Message</p></li>
                                <li class="hoi-x"><p style="font-family:Tahoma; font-weight:bold; color:#FF7200; padding-top:20px; padding-bottom:10px; text-decoration:underline;">Trả lời:</p></li>
                                <li class="hoi-III">
                                	@Html.Raw(feed.ReplyMessage)
                                </li>
                            </ul>
                        </div>
                        <div class="boxhoidap-I">
                        	<ul>
                            	<li class="hoi-iI"><p>Hỏi đáp liên quan</p></li>
                                <li class="hoi-iII">
                                    @foreach (var item in relative)
                                    {
                                        <a href="/@string.Concat(langText,"qa/detail/",item.FeedbackID.ToString())">@item.Title</a>
                                    }                                	
                                </li>
                            </ul>
                        </div>
                        <!--
                        <div class="pageT">
                        	<ul>
                            	<li><a href="#">Trang đầu</a></li>
                            	<li class="active"><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">...</a></li>
                                <li><a href="#"><img src="images/icon-14.png" alt="" /></a></li>
                                <li><a href="#">Trang cuối</a></li>
                            </ul>
                        </div>
                        -->
                    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".titlesub p").empty();
            var lang = document.URL.indexOf("en-US") < 0 ? true : false;
            if (lang) {
                $(".titlesub p").append("Hỏi đáp");
                $("#ulink_home a").append("Trang chủ");
                $("#ulink_child a").append("Hỏi đáp");
                $("#ulink_child a").attr("href", "/qa");
            }
            else {
                $(".titlesub p").append("Question - Answer");
                $("#ulink_home a").append("Home");
                $("#ulink_home a").attr("href", "/en-US/home");
                $("#ulink_child a").append("Question - Answer");
                $("#ulink_child a").attr("href", "/en-US/qa");
            }
        });
</script>